package com.qfedu.servlet;

import com.qfedu.entity.Type;
import com.qfedu.service.ITypeService;
import com.qfedu.service.impl.TypeServiceImpl;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

@WebServlet("/type")
public class TypeServlet extends BaseServlet{
    private ITypeService typeService = new TypeServiceImpl();
    public List<Type> showType(HttpServletRequest request,HttpServletResponse response){
        //System.out.println(1);
        List<Type> types = typeService.listType();
        return types;
    }
}